package com.rmi.client;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

public class RmiClient {
	public static void main(String args[]) throws RemoteException, MalformedURLException, NotBoundException {
		String url = "rmi://127.0.0.1/addnumbers";
		AddServer add;
		add = (AddServer) Naming.lookup(url);
		int result = add.AddNumbers(10, 10);
		System.out.println(result);
		add.SayHello("DylanHu");
	}
}
